
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wo"></use>
                    </svg>
                    <div class="name">我</div>
                    <div class="fontclass">#icon-wo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ai03"></use>
                    </svg>
                    <div class="name">微信_更多功能</div>
                    <div class="fontclass">#icon-ai03</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tongxunlu"></use>
                    </svg>
                    <div class="name">通讯录</div>
                    <div class="fontclass">#icon-tongxunlu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xingchengfenxiangweixinsaoyisao"></use>
                    </svg>
                    <div class="name">行程分享_微信扫一扫</div>
                    <div class="fontclass">#icon-xingchengfenxiangweixinsaoyisao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-faxian"></use>
                    </svg>
                    <div class="name">发现</div>
                    <div class="fontclass">#icon-faxian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao"></use>
                    </svg>
                    <div class="name">微信 图标</div>
                    <div class="fontclass">#icon-weixintubiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin"></use>
                    </svg>
                    <div class="name">微信</div>
                    <div class="fontclass">#icon-weixin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao1"></use>
                    </svg>
                    <div class="name">微信 图标</div>
                    <div class="fontclass">#icon-weixintubiao1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gengduo"></use>
                    </svg>
                    <div class="name">更多</div>
                    <div class="fontclass">#icon-gengduo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouwu"></use>
                    </svg>
                    <div class="name">购物</div>
                    <div class="fontclass">#icon-gouwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-diannao"></use>
                    </svg>
                    <div class="name">电脑</div>
                    <div class="fontclass">#icon-diannao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youxi"></use>
                    </svg>
                    <div class="name">游戏</div>
                    <div class="fontclass">#icon-youxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-"></use>
                    </svg>
                    <div class="name">微信 图标-01</div>
                    <div class="fontclass">#icon-weixintubiao-</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-1"></use>
                    </svg>
                    <div class="name">微信 图标-02</div>
                    <div class="fontclass">#icon-weixintubiao-1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-2"></use>
                    </svg>
                    <div class="name">微信 图标-03</div>
                    <div class="fontclass">#icon-weixintubiao-2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-3"></use>
                    </svg>
                    <div class="name">微信 图标-04</div>
                    <div class="fontclass">#icon-weixintubiao-3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-4"></use>
                    </svg>
                    <div class="name">微信 图标-06</div>
                    <div class="fontclass">#icon-weixintubiao-4</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-5"></use>
                    </svg>
                    <div class="name">微信 图标-10</div>
                    <div class="fontclass">#icon-weixintubiao-5</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-6"></use>
                    </svg>
                    <div class="name">微信 图标-09</div>
                    <div class="fontclass">#icon-weixintubiao-6</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-7"></use>
                    </svg>
                    <div class="name">微信 图标-07</div>
                    <div class="fontclass">#icon-weixintubiao-7</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao-8"></use>
                    </svg>
                    <div class="name">微信 图标-08</div>
                    <div class="fontclass">#icon-weixintubiao-8</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinsousuoicon"></use>
                    </svg>
                    <div class="name">微信搜索icon</div>
                    <div class="fontclass">#icon-weixinsousuoicon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinpengyouquan"></use>
                    </svg>
                    <div class="name">微信朋友圈</div>
                    <div class="fontclass">#icon-weixinpengyouquan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wx_biaoqing"></use>
                    </svg>
                    <div class="name">微信表情</div>
                    <div class="fontclass">#icon-wx_biaoqing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinqianbao"></use>
                    </svg>
                    <div class="name">微信钱包</div>
                    <div class="fontclass">#icon-weixinqianbao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-erweima"></use>
                    </svg>
                    <div class="name">二维码</div>
                    <div class="fontclass">#icon-erweima</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yuyin"></use>
                    </svg>
                    <div class="name">语音</div>
                    <div class="fontclass">#icon-yuyin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-saoyisao"></use>
                    </svg>
                    <div class="name">扫一扫</div>
                    <div class="fontclass">#icon-saoyisao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouwu1"></use>
                    </svg>
                    <div class="name">购物</div>
                    <div class="fontclass">#icon-gouwu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinsousuo"></use>
                    </svg>
                    <div class="name">微信搜索</div>
                    <div class="fontclass">#icon-weixinsousuo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin-gengduo-gai"></use>
                    </svg>
                    <div class="name">微信-更多-改</div>
                    <div class="fontclass">#icon-weixin-gengduo-gai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-piaoliuping"></use>
                    </svg>
                    <div class="name">漂流瓶</div>
                    <div class="fontclass">#icon-piaoliuping</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-souyisou"></use>
                    </svg>
                    <div class="name">搜一搜</div>
                    <div class="fontclass">#icon-souyisou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiaochengxu"></use>
                    </svg>
                    <div class="name">小程序</div>
                    <div class="fontclass">#icon-xiaochengxu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gongzhonghaotubiao"></use>
                    </svg>
                    <div class="name">公众号图标</div>
                    <div class="fontclass">#icon-gongzhonghaotubiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-AppleWatchStyle"></use>
                    </svg>
                    <div class="name">Apple Watch Style </div>
                    <div class="fontclass">#icon-AppleWatchStyle</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixintubiao2"></use>
                    </svg>
                    <div class="name">微信图标</div>
                    <div class="fontclass">#icon-weixintubiao2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kanyikan"></use>
                    </svg>
                    <div class="name">看一看</div>
                    <div class="fontclass">#icon-kanyikan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wx_shake-copy"></use>
                    </svg>
                    <div class="name">微信摇一摇</div>
                    <div class="fontclass">#icon-wx_shake-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qunliao"></use>
                    </svg>
                    <div class="name">群聊</div>
                    <div class="fontclass">#icon-qunliao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gengduo1"></use>
                    </svg>
                    <div class="name">更多</div>
                    <div class="fontclass">#icon-gengduo1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinshoucang"></use>
                    </svg>
                    <div class="name">微信收藏</div>
                    <div class="fontclass">#icon-weixinshoucang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinshezhi"></use>
                    </svg>
                    <div class="name">微信设置</div>
                    <div class="fontclass">#icon-weixinshezhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinxiangce"></use>
                    </svg>
                    <div class="name">微信相册</div>
                    <div class="fontclass">#icon-weixinxiangce</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-biaoqian"></use>
                    </svg>
                    <div class="name">标签</div>
                    <div class="fontclass">#icon-biaoqian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xindepengyou"></use>
                    </svg>
                    <div class="name">新的朋友</div>
                    <div class="fontclass">#icon-xindepengyou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-biaoxing"></use>
                    </svg>
                    <div class="name">标星 2</div>
                    <div class="fontclass">#icon-biaoxing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixinqiabao"></use>
                    </svg>
                    <div class="name">微信卡包</div>
                    <div class="fontclass">#icon-weixinqiabao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-contacts-o"></use>
                    </svg>
                    <div class="name">微信通讯录</div>
                    <div class="fontclass">#icon-contacts-o</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gongzhonghao"></use>
                    </svg>
                    <div class="name">公众号</div>
                    <div class="fontclass">#icon-gongzhonghao</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
